Prompt caching (OpenAI Responses API)
Prompt cache retention
If you don’t specify a retention policy, the default is in_memory.
24hの指定もできる
Best practices
Structure prompts with static or repeated content at the beginning and dynamic, user-specific content at the end.
Use the prompt_cache_key parameter consistently across requests that share common prefixes.
Monitor your cache performance metrics
Maintain a steady stream of requests